package com.栈;

import java.util.Stack;

/**
 *
 * 使用栈实现队列的下列操作：
 * push(x) -- 将一个元素放入队列的尾部。
 * pop() -- 从队列首部移除元素。
 * peek() -- 返回队列首部的元素。
 * empty() -- 返回队列是否为空。
 */
public class MyQueue {
    private int head; //队首
    Stack<Integer> data ;

    /** Initialize your data structure here. */
    public MyQueue() {
        data = new Stack<>();
        head = 0;

    }

    /** Push element x to the back of queue. */
    public void push(int x) {
        data.push(x);

    }

    /** Removes the element from in front of queue and returns that element. */
    public int pop() {
        return 1;
    }

    /** Get the front element. */
    public int peek() {
        return 1;
    }

    /** Returns whether the queue is empty. */
    public boolean empty() {
        return   true;
    }

    public static void main(String[] args) {
        Stack<Integer> stack = new Stack<>();
        stack.push(110);
        stack.push(120);
        stack.push(1230);
        System.out.println(stack.get(0));
        System.out.println(stack.size());
    }
}
